<app:account-edit-page page-title='Change password'>
<form app:submit='AccountPassword.submit()' class='account-block' name='form'>
<md-input-container app:form-fail-anim='anim-shake' ng:if='Me().password'>
<label>Old Password</label>
<input name='oldPassword' ng:model='AccountPassword.oldPassword' type='password'>
<div class='_hint' ng:if='Me().password'>Your current password.<br>&nbsp;</div>
</md-input-container>
<md-input-container>
<label>New Password</label>
<input app:custom-validator='AccountPassword.passwordValidators' minlength='8' name='password' ng:model='AccountPassword.password' required type='password'>
<div class='_hint' ng:if='form.password.$pristine || !form.password.$invalid'>
Must be at least 8 characters including one uppercase letter, one special character and alphanumeric characters.
</div>
<div class='error' include='error-message' ng-messages='form.password.$error' ng:show='form.password.$dirty'>
<div ng-message='correct'>Only alphanumeric and special characters are allowed.</div>
<div ng-message='minlength'>Minimum 8 characters.</div>
<div ng-message='number'>Please include at least one numeric character.</div>
<div ng-message='non_number'>Please include at least one non-numeric character.</div>
</div>
</md-input-container>
<md-input-container>
<label>Confirm Password</label>
<input app:custom-validator='AccountPassword.passwordConfirmValidators' name='passwordConfirm' ng:model='AccountPassword.passwordConfirm' required type='password'>
<div class='_hint' ng:if='form.passwordConfirm.$pristine || !form.passwordConfirm.$invalid'>
Once again please.<br>&nbsp;
</div>
<div class='error' ng-messages='form.passwordConfirm.$error' ng:sjow='form.passwordConfirm.$dirty'>
<div ng-message='match'>Password doesn't match.</div>
</div>
</md-input-container>
<div class='account-controls'>
<md:button class='md-primary md-hue-1' ng:href="#!{{'top.account' | routeSegmentUrlStateless}}">Cancel</md:button>
<md:button app:submit-animated class='md-primary md-raised' ng:disabled='form.$invalid' type='submit'>Save</md:button>
</div>
</form>
</app:account-edit-page>
